package ssm.utils;

import org.springframework.cglib.core.TinyBitSet;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Const {

    public static final String CURRENT_USER = "currentUser";
    public static final String EMAIL = "email";
    public static final String USERNAME = "username";
    public enum WorkStatus {
        //加班类
        CHUQIN(1, "教师出勤"),
        JIABAN(5, "教师加班"),
        ZHIBAN(7, "教师值班"),
        BEIQIN(6, "教师备勤"),

        //外出访学类
        GUONEIFANGXUE(11, "国内访学"),
        GUOWAIFANGXUE(12, "国外访学"),
        PEIXUN(16, "教师培训"),
        DUBO(14, "读博士"),
        WAIJIE(10, "教师外借"),
        DUANLIAN(8, "教师锻炼"),
        FUDAOYUAN(9,"辅导员"),
        USHUO(13,"读硕"),
        DUBOSHIHOU(15,"读博士后"),
        CHUCHAI(18,"出差"),
        kaihui(19,"开会"),
        //请假类
        SHIJIA(83, "教师事假"),
        BINGJIA(84, "教师病假"),
        chanjia(87,"产假"),
        nianxiujia(94,"年休假"),
        buxiujia(94,"补休假"),
        sangjia(89,"丧假"),
        hunjia(86,"婚假"),
        hulijia(88,"护理假"),
        gongshangjia(90,"工伤假"),
        tanqinjia(91,"探亲假"),
        jiejiari(1001,"节假日"),
        zhoumoshuangxiu(1002,"周末双休");
;

        private String value;
        private int code;

        WorkStatus(int code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }
    }

    public enum TimeSlot {
        //时间分段
        MORNINGSTART("早班开始时间", "06:00:00"),
        MORNINGEND("早班结束时间", "12:00:00"),
        AFTERNOONSTART("午班开始时间", "12:00:00"),
        AFTERNOONEND("午班结束时间", "17:30:00"),
        EVENINGSTART("晚班开始时间", "18:00:00"),
        EVENINGEND("晚班开始时间", "22:00:00"),
        MIDNIGHTSTART("夜班开始时间", "22:00:00"),
        MIDNIGHTEND("夜班开始时间", "23:59:59"),
        CHIDAOTIME("迟到时间", "08:30:00"),
        WANSHANGJIABAN("晚上加班", "21:00:00");
        private String value;
        private String detial;

        TimeSlot(String value, String detial) {
            this.value = value;
            this.detial = detial;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public String getDetial() {
            return detial;
        }

        public void setDetial(String detial) {
            this.detial = detial;
        }
    }

    public enum StatusArray {

        //在校 离校编号
        INSCHOOL("在校编号集合", new ArrayList<Integer>() {{
            add(1);
            add(5);
            add(6);
            add(7);

        }}),
        YINGONGWAICHU("因公外出", new ArrayList<Integer>() {{
            add(8);
            add(9);
            add(10);
            add(11);
            add(12);
            add(13);
            add(14);
            add(15);
            add(16);
            add(18);
            add(19);
        }}),
        JIAQI("假期",new ArrayList<Integer>(){{
        add(83);
        add(84);
        add(86);
        add(87);
        add(88);
        add(89);
        add(90);
        add(91);
        add(94);
        add(95);
        add(1001);
        add(1002);
        }
        });
        private String detail;
        private List<Integer> list;

        StatusArray(String detail, List<Integer> list) {
            this.detail = detail;
            this.list = list;
        }

        public String getDetail() {
            return detail;
        }

        public void setDetail(String detail) {
            this.detail = detail;
        }

        public List<Integer> getList() {
            return list;
        }

        public void setList(List<Integer> list) {
            this.list = list;
        }
    }

    public enum workArrangeStatus {
        SHANGBAN(1, "上班"),
        BUBAN(2, "补班"),
        JIEJIARI(3, "节假日"),
        ZHOUMO(4, "周末"),
        QITAZAIXIAO(100,"其他在校"),
        QITABUZAIXIAO(200, "其他不在校"),;

        private int status;
        private String value;

        workArrangeStatus(int status, String value) {
            this.status = status;
            this.value = value;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    public enum Role {
        LEAP(0, "领导"),
        TEACHER(1, "教师")
        ;

        private int status;
        private String value;

        Role(int status, String value) {
            this.status = status;
            this.value = value;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

}
